#include <iostream>
#include "Game.h"

unsigned int    randuint(unsigned int max)
{
  return rand() % (max + 1);
}

Game::Game(int e) : _zoom(1), _clicked(0), _paused(false)
{
  _edges = e;
  std::cout << "." << std::flush;
  // creer une liste desordonnee de toutes les coord possibles
  std::cout << "." << std::flush;

  std::cout << "." << std::flush;
}

bool		Game::paused() const
{
  return this->_paused;
}

char		Game::getZoom() const
{
  return this->_zoom;
}

SDL_Surface*	Game::getScreen() const
{
  return this->_screen;
}

bool		Game::belongs(int x, int y)
{
  if (x >= 0 && x < _xdim && y >= 0 && y < _ydim)
    return true;
  return false;
}

void		Game::sync()
{
  SDL_Flip(this->_screen);
}

void		Game::setEdges(int e)
{
  this->_edges = e;
  std::cout << this->_edges << std::endl;
}

int		Game::getEdges() const
{
  return this->_edges;
}

bool		Game::clicked() const
{
  if (this->_clicked)
    return true;
  return false;
}

int		Game::getMx() const
{
  return this->_mouse.x;
}

int		Game::getMy() const
{
  return this->_mouse.y;
}
